<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=div, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* background-color  背景颜色
        background-image     背景图片
        background-repeat    背景平铺
        background-position  背景定位
        */
        .box {
            width: 300px;
            height: 300px;
            border: 1px solid #ccc;
            background-image: url(./image/01.jpg);
            /*平铺*/
            background-repeat: no-repeat;
            background-size: 100% 100%;
        }

        .icon {
            width: 24px;
            height: 20px;
            border: 1px solid #ccc;
            box-sizing: border-box;
            margin: 0 auto;
            background-image: url("./image/icon.png");
            background-repeat: no-repeat;
            /*x轴的值,y轴的值*/
            background-position: -1px -74.5px;
        }
    </style>
</head>

<body>
    <div class="box"></div>
    <div class="icon"></div>
</body>

</html>